<!-- 库存结转 -->
<template>
  <view class="inventoryCarryover">
    <view class="top">
      <van-button type="info">结转</van-button>
      <view> 全选 </view>
    </view>
    <view class="content">
      <view class="list-box"  v-for="(item,index) in formList" :key="index">
        <view class="box">
          <view class="box-left"> <van-radio shape="square"  name="1" checked-color="#5677FC"></van-radio> </view>
          <view class="box-right">
            <view class="row-style">
              <view> 结转年份:{{item.year_carried_forward  }} </view>
              <view> 结转人:{{ item.carryforward }} </view>
            </view>
            <view class="row-style">
              <view> 是否结转:{{ item.iScarry_over }} </view>
              <view> 结转数:{{ item.number_carried_forward }} </view>
            </view>
            <view class="row-style">
              <view> 结转时间:{{ item.carry_over_time }} </view>
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>
  
<script>
export default {
  data() {
    return {
     
      formList: [
        {
          year_carried_forward: "2023-7", //结转年份
          carryforward: "张三", //结转人
          iScarry_over: 1, // 是否结转 1是 0否
          number_carried_forward: 5, //结转数
          carry_over_time: "2023-08-14", // 结转时间
        },
        {
          year_carried_forward: "2023-7", //结转年份
          carryforward: "张三", //结转人
          iScarry_over: 1, // 是否结转 1是 0否
          number_carried_forward: 5, //结转数
          carry_over_time: "2023-08-14", // 结转时间
        },
        {
          year_carried_forward: "2023-7", //结转年份
          carryforward: "张三", //结转人
          iScarry_over: 1, // 是否结转 1是 0否
          number_carried_forward: 5, //结转数
          carry_over_time: "2023-08-14", // 结转时间
        },
      ],
    };
  },

  // 监听页面加载，该钩子被调用时
  onLoad() {},
  methods: {
    submitData() {
      console.log(this.form, "form");
      // uni==wx
      uni.switchTab({
        url: "../home/home",
      });
    },

    onChange(event) {
      this.setData({
        radio: event.detail,
      });
    },
  },

  mounted() {},

  // 监听页面显示，页面每次出现在屏幕上都触发
  onShow() {
    uni.setNavigationBarTitle({
      title: "库存结转",
    });
  },

  // 监听用户下拉动作，一般用于下拉刷新
  onPullDownRefresh() {},

  // 监听页面初次渲染完成，此时组件已挂载完成
  onReady() {},
};
</script>
  
<style lang="scss">
.inventoryCarryover {
  min-height: 100vh;
  height: 100%;
  background: rgba(244, 244, 244, 1);
  padding: 20rpx;
  padding-bottom: 50rpx;

  .top {
    display: flex;
    justify-content: space-between;
    line-height: 60rpx;
    color: rgba(46, 136, 238, 1);
    font-size: 28rpx;
    font-family: SourceHanSansSC-regular;

    .van-button {
      width: 160rpx;
      height: 60rpx;
      border-radius: 8rpx;
    }
  }

  .content {
    .list-box {
      //   width: 100%;
      height: 200rpx;
      border-radius: 8rpx;
      background: white;
      margin-top: 30rpx;
      display: flex;
      padding: 30rpx;
      color: rgba(16, 16, 16, 1);
      box-shadow: 0rpx 4rpx 8rpx 0rpx #afafaf;

      .box {
        display: flex;
        // justify-content: space-evenly;
        .box-left{
            display: flex;
            align-items: center;
            justify-content: center;
           
        }
        width: 100%;
        .box-right {
            margin-left: 26rpx;
            width: 100%;
            line-height: 50rpx;
          .row-style {
            display: flex;
            justify-content: space-between;
            // width: 100%;
          }
        }
      }
    }
  }
}
</style>